<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="apple-mobile-web-app-status-bar-style" content="white" />
        <meta name="apple-mobile-web-app-capable" content="yes" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
        <meta http-equiv="cache-control" content="no-cache">
        <title>七夕我要索吻</title>
        <meta name="description" content="索吻赢奖品，大家一起来~">
        <script type="text/javascript">
            var viewWidth = 640;
            var phoneWidth = parseInt(window.screen.width);
            var phoneScale = phoneWidth / viewWidth;
            var isAndroid = false;
            var androidVer = 4.0;
            var ua = navigator.userAgent;
            if (/Android (\d+\.\d+)/.test(ua)){
                isAndroid = true;
                var version = parseFloat(RegExp.$1);
                androidVer = version;
                var phoneHeight = parseInt(window.screen.height);
                if (phoneWidth <= phoneHeight) {
                    if(version > 2.3){
                        document.write('<meta name="viewport" content="width='+viewWidth+', initial-scale='+phoneScale+', minimum-scale='+phoneScale+', maximum-scale='+phoneScale+', target-densitydpi=device-dpi" />');
                    }else{
                        document.write('<meta name="viewport" content="width='+viewWidth+', target-densitydpi=device-dpi" />');
                    }
                } else {
                    phoneScale = phoneHeight / viewWidth;
                    var deviceWidth = viewWidth * phoneWidth / phoneHeight;
                    if(version > 2.3){
                        document.write('<meta name="viewport" content="width='+deviceWidth+', initial-scale='+phoneScale+', minimum-scale='+phoneScale+', maximum-scale='+phoneScale+', target-densitydpi=device-dpi" />');
                    }else{
                        document.write('<meta name="viewport" content="width='+deviceWidth+', target-densitydpi=device-dpi" />');
                    }
                }
            } else {
                document.write('<meta name="viewport" content="width='+viewWidth+', user-scalable=no, initial-scale='+phoneScale+', minimum-scale='+phoneScale+', maximum-scale='+phoneScale+'" />');
            }
        </script>
        <link rel="stylesheet" type="text/css" href="wap/www/wap/qixi.css">
    </head>
    <body>
        <div id="wrapper" class="wrapper">
            <div id="bgLayer" class="bg-layer">
                <img id="bgImg" class="bg-bg" style="visibility: visible; opacity: 1;" src="wap/www/wap/top_bg.jpg">
            </div>
        </div>
        <div id="picLayer" class="pic-layer"> 
            <img id="picImg" d-kissid="<{$kissInfo.id}>" class="pic-img" style="visibility: visible; opacity: 1;" src="<{$kissInfo.photo}>">
            <img id="kissImg" class="kiss-img" <{if $hasGive }> style="visibility: visible; opacity: 1;" <{else}>  style="visibility: hidden; opacity: 0;" <{/if}> src="wap/www/wap/kiss.png">
        </div>
        <div id="uploadTipsLayer" class="uploadTips-layer">
           <img id="uploadTips" class="upload-tips" style="visibility: hidden; opacity: 1;" src="wap/www/wap/uploadtips.png">
        </div>

        <div id="actionLayer" class="action-layer">
        	<!-- 没有给过吻 且不是自己发起的 显示给他一个吻 -->
            <{if !$hasGive && !$isMyself }><div id="swBtn" class="sw-btn giveBtn">给TA一个飞吻</div><{/if}>
            <!-- 如果我有发起过 显示我也要索吻 -->
            <{if $hasStart && $myKiss.id }>
	            <{if $fromme || $openid == $kissInfo.openid  }>
	            	<!-- 如果当前是自己发起的 则弹出提示分享 -->
	            	<div id="gzBtn" class="gz-btn" onclick="myshowShare()">我要索吻</a></div>
	            <{else}>
	            	<!-- 如果当前不是自己发起的 则转到自己发起的内容页面 -->
	            	<div id="gzBtn" class="gz-btn"><a href="wap.php?c=main&a=shared&kissid=<{$myKiss.id}>&fromme=1">我也要索吻</a></div>
	            <{/if}>
	        <!-- 否则 显示我也要晒照索吻 -->
            <{else}>
            	<div id="gzBtn" class="gz-btn"><a href="wap.php?c=main&a=index">我也要晒照索吻</a></div>
            <{/if}>
            <!-- 如果在自己发起的页面 显示我要关注 -->
            <{if $fromme || $hasGive  || $openid == $kissInfo.openid }><div id="gzBtn" class="gz-btn" onclick="javascript:location.href='http://mp.weixin.qq.com/s?__biz=MjM5ODU5NTk1OQ==&mid=216205408&idx=1&sn=c6446762d9dbf28e5bfbe3b7e892d708#rd'">关注美天等待开奖</div><{/if}>
            <{if $isMyself && !$hasEnd && $pm>$CT && 1<0 }><div id="zjBtn" class="gz-btn"><a href="wap.php?c=main&a=index">领取奖品</a></div><{/if}>
        </div>

        <div id="awardsLayer" class="awards-layer">
           <img id="line" class="line-left" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
           <label id="awardsText" class="awards-text">奖项设置</label>
           <img id="line" class="line-right" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
        </div>

        <div id="awardsInfo" class="action-info">
            <span style="color: #ec73a8">一等奖：</span>
            吻数最多的用户可以获得一支GIVENCHY 纪梵希高级定制系列唇膏</br>
            <span style="color: #ec73a8">二等奖：</span>
            吻数前30名的用户可以获得一盒美天携手ORIGINS打造的限量礼盒－膜法天天混体验礼盒</br>
            <span style="color: #ec73a8">三等奖：</span>
            索吻满50个kiss的用户可以有机会获得GIVENCHY 纪梵希滋养修护粉底液2号(促销装)*2个(限量300个，送完即止)</br>
        </div>

        <div id="awardsLayer" class="awards-layer">
           <img id="line" class="line-left" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
           <label id="awardsText" class="awards-text">活动规则</label>
           <img id="line" class="line-right" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
        </div>

        <div id="awardsInfo" class="action-info">
            1. 上传美照后点击“我要索吻”向好友征得甜蜜香吻，吻数榜上吻数最多的前30名用户并且关注美天MEITODAY官方微信者可以获得美天MEITODAY提供的精美好礼；</br>
            2.活动时间：即日起－2015.08.23；</br>
            3.中奖名单将于2015年8月24日在美天MEITODAY官方微信上公布，敬请关注；</br>
            4. 美天MEITODAY保留法律范围内允许的对活动的解释权。</br>
        </div>

        <div id="awardsLayer" class="awards-layer">
           <img id="line" class="line-left" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
           <label id="awardsText" class="awards-text">&nbsp;&nbsp;吻数榜&nbsp;</label>
           <img id="line" class="line-right" style="visibility: visible; opacity: 1;" src="wap/www/wap/line.png">
        </div> 
        
<div id="kisslist">
	<dl>
		<dd>
        	<em><img src="<{$uinfo.headimgurl}>" /></em>
            <span><b><{$kissInfo.kisscount}></b> Kiss</span>
            <p>
                <img id="crown" class="crown" src="wap/www/wap/crown.png" style="opacity:0" />
                <b><{if $isMyself }>我的<{else}>朋友<{/if}></b>
                <img  id="kiss" class="kiss" src="wap/www/wap/kiss_small.png" />
                <u><{$uinfo.nickname}></u>
                <time><{$kissInfo.created}></time>  
            </p>
        </dd>
    <{foreach from=$PMList item=itm}>
		<dd>
        	<em><img src="<{$itm.headimgurl}>" /></em>
            <span><b><{$itm.kisscount}></b> Kiss</span>
            <p>
               	<img id="crown" class="crown" src="wap/www/wap/crown.png"  <{if 1!=$itm.NO}>style="opacity:0"<{/if}>></img>
                <b>NO.<{$itm.NO}></b>
                <img  id="kiss" class="kiss" src="wap/www/wap/kiss_small.png"></kissimg>
                <u><{$itm.nickname}></u>
                <time><{$itm.created}></time>  
            </p>
        </dd>
        <{/foreach}>
	</dl>
</div>
        <div id="shareLayer" class="share-layer" <{if $fromme}> style="display: block" <{/if}> onclick="hiddenTips()">
           <img id="shareTips" class="share-tips" style="visibility: hidden; opacity: 1;" src="wap/www/wap/share_tips.png">
        </div>
		
        <script type="text/javascript" src="wap/www/wap/jquery-1.11.2.min.js"></script>
        <script type="text/javascript" src="wap/www/wap/ext.js"></script>
        <script type="text/javascript" src="wap/www/wap/qixi.js"></script>
<!-- 微信分享 Start -->
<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script language="javascript">
var sTitle = '七夕索吻赢纪梵希';
var sDesc = '想赢纪梵希么？想赢origins面膜么？七夕请大家吻过来！';
var sImg = '<{$kissInfo.photo}>';//http://m.meitoday.com/wap/wap/www/wap/ico.jpg';
var sLink = 'http://m.meitoday.com/wap/wap.php?c=main&a=shared&kissid=<{$kissInfo.id}>'; 
$(function(){
	getConf(); 
});

function getConf(){
	$.post('wap.php?c=main&a=getJsConf',{'url':location.href},function(res){
	 
		var obj = eval('('+res+')');
		if(obj.s){
			wx.config({ 
			    appId: obj.d.appid, // 必填，公众号的唯一标识
			    timestamp: obj.d.timestamp, // 必填，生成签名的时间戳
			    nonceStr: obj.d.noncestr, // 必填，生成签名的随机串 
			    signature: obj.d.signature,// 必填，签名，见附录1
			    jsApiList: ['onMenuShareTimeline','onMenuShareAppMessage','onMenuShareQQ','onMenuShareWeibo','onMenuShareQZone']
			}); 
			wx.ready(function(){ InitSetting(); });
			wx.error(function(res){ });
		}
	});
}

function myshowShare(){
	$('#shareLayer,#shareTips').fadeIn();
	$("#shareLayer").css("visibility", "visible");
    $("#shareTips").css("visibility", "visible");
}

//设置分享信息
function InitSetting(){
	try{
		wx.onMenuShareTimeline({ title: sTitle,  link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} });
		wx.onMenuShareAppMessage({ title: sTitle, desc: sDesc, link: sLink, imgUrl: sImg,  success: function () {}, cancel: function () {} }); 
		wx.onMenuShareQQ({ title: sTitle, desc: sDesc, link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} }); 
		wx.onMenuShareWeibo({ title: sTitle,  desc: sDesc,  link: sLink, imgUrl: sImg, success: function () {}, cancel: function () {} }); 
		wx.onMenuShareQZone({ title: sTitle,  desc: sDesc,  link: sLink,  imgUrl: sImg,  success: function () {}, cancel: function () {} });
	} catch (e) { }
}
</script>
<!-- 微信分享 End -->
<script>
if()
</script>
    </body>
</html>